home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#41 (Feb 89)
/
security code
/
CodeSizeLimits.p
< prev
next >
Wrap
Text File
|
1988-11-29
|
1KB
|
47 lines
UNIT CodeSizeLimits;
{-------------------------------------------}
(*
©1988 by Steve Seaquist. All rights reserved.
Used by permission. Use at your own risk.
No warranty is expressed or implied.
This Macintosh virus-detecting program was
originally published and explained in the
February 1989 issue of MacTutor magazine.
Some aspects of its design are important to
security, and it uses some unusual
techniques, so please read the article.
*)
{-------------------------------------------}
INTERFACE
VAR
gJTSize: INTEGER;
gEntryPoint: LONGINT;
gSizeLimit:
ARRAY [0..8] OF LONGINT;
gMaxCode: INTEGER;
PROCEDURE GetCodeSizeLimits;
{*******************************************}
IMPLEMENTATION
PROCEDURE zzSecurityPatrol; EXTERNAL;
{-------------------------------------------}
PROCEDURE GetCodeSizeLimits;
BEGIN
gEntryPoint := ORD4(@zzSecurityPatrol)+$1A;
gJTSize := 1240;
gMaxCode := 8;
gSizeLimit[0] := gJTSize + 16;
gSizeLimit[1] := 15700;
gSizeLimit[2] := 23900;
gSizeLimit[3] := 11200;
gSizeLimit[4] := 00844;
gSizeLimit[5] := 01908;
gSizeLimit[6] := 01606;
gSizeLimit[7] := 01822;
gSizeLimit[8] := 01312;
END;
{*******************************************}
END.